package com.example.littleSpider.myapplication.fragment.gankuai.recive;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.example.littleSpider.myapplication.R;
import com.example.littleSpider.myapplication.adapter.IntentionAdatper;
import com.example.littleSpider.myapplication.base.BaseFragment;
import com.littlespider.mylibrary.util.T;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by EDZ on 2017/12/26.
 */

public class IntentionFragment extends BaseFragment {
    @BindView(R.id.recycle_intention)
    RecyclerView recycle_intention;
    @Override
    protected int setLayout() {
        return R.layout.fragment_intention;
    }

    @Override
    protected void initView() {
        recycle_intention.setLayoutManager(new LinearLayoutManager(getContext()));

        List<String> datas = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            datas.add("");

        }

        IntentionAdatper adatper = new IntentionAdatper(R.layout.item_intention,datas);
        adatper.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
            @Override
            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
                T.show(getContext(),"delete");
            }
        });
        recycle_intention.setAdapter(adatper);

    }

    @Override
    protected void initData() {

    }
}
